import { http } from '@/plugin/axios/index.js'

// 获取用户基础信息
export async function getUserInfo (params) {
  return await http.get('/h5/person/getUserInfo', { queryParam: params })
}
// 头部数据
export async function homeHeaderData (params) {
  return await http.get('/manage/toolkit/homeHeaderData', { queryParam: params })
}

// 首页列表
export async function getShopList (params) {
  return await http.get('/manage/toolkit/getShopList', { queryParam: params })
}
// 湖区地区
export async function cityList (params) {
  return await http.get('/manage/common/cityList', { queryParam: params })
}
// 县区
export async function countyList (params) {
  return await http.get('/manage/common/countyList', { queryParam: params })
}
// 门店名称
export async function getShopNameList (params) {
  return await http.get('/manage/toolkit/getShopNameList', { queryParam: params })
}
// 渠道获取二维码列表
export async function getCodeList (params) {
  return await http.post('/manage/toolkit/getBusinessConfigList', params)
}
// 渠道生成二维码
export async function getCode (params) {
  return await http.get('/manage/toolkit/generateCode', { queryParam: params })
}
// 开启、关闭
export async function getOpen (params) {
  return await http.get('/manage/toolkit/open', { queryParam: params })
}
// 修改/新增门店
export async function saveShop (params) {
  return await http.get('/manage/toolkit/saveShop', { queryParam: params })
}
// // 全部订单
// export async function getOrderListByPage (params) {
//   return await http.get('/h5/shopUser/getOrderListByPage', { queryParam: params })
// }
// 修改名称
export async function updateUserName (params) {
  return await http.post('/h5/shopUser/updateUserName', params)
}
// 修改手机
export async function updatePhone (params) {
  return await http.post('/h5/shopUser/updatePhone', params)
}
// 获取验证码
export async function sendCode (params) {
  return await http.post('/h5/shopUser/sendCode', params)
}
// 发送验证码
export async function verificationCode (params) {
  return await http.post('/h5/shopUser//verificationCode', params)
}

// 分销二维码
export async function getQrCodeUrl (params) {
  return await http.get('/h5/shopUser/getQrCodeUrl', { queryParam: params })
}

// 获取门店人员列表
export async function getShopUserListByPage (params) {
  return await http.get('/h5/shopUser/getShopUserListByPage', { queryParam: params })
}

// 修改增加人员
export async function addShopUser (params) {
  return await http.post('/h5/shopUser/addShopUser', params)
}
// 删除人员
export async function deleteUser (params) {
  return await http.post('/h5/shopUser/deleteUser', params)
}

// 营业员二维码列表
export async function getBusinessConfigList (params) {
  return await http.post('/h5/shopUser/getBusinessConfigList', params)
}
// 营业员生成二维码
export async function generateCode (params) {
  return await http.post('/h5/shopUser/generateCode', params)
}
// 下载二维码
export async function downloadqrCode (params) {
  return await http.post('/h5/shopUser/downloadqrCode', params, null, { responseType: 'blob' })
}

// 退出
export async function loginOut (params) {
  return await http.post('/h5/shopUser/loginOut', params)
}
